The intent of this FKEY is to be able to avoid going to the Chooser to turn off AppleTalk every time you take your PowerBook on the road since this requires a menu item, a button click, an ÒAre you sureÓ dialog, an OK dialog and a close box. Turning it back on requires a menu item, a button click, an OK dialog and a close box. This is almost more trouble than it is worth.
Why all this bother in the first place? Why not leave AppleTalk on all the time? The simplest reason is power. A battery powered Macintosh needs to run as few hardware things as it can to conserve its power for a longer running time. In this vein you want to keep the hard disk and AppleTalk off when running on batteries. The hard disk is pretty obvious. In addition to drawing a lot of power, it is at least audible in many settings, reminding you to turn it off. AppleTalk is a little more sly. It doesnÕt make noise and doesnÕt remind you that it is constantly polling the hardware sending ÒIÕm hereÓ messages and looking for incoming messages. When you arenÕt connected this is pretty pointless, and it still draws power to poll the hardware. So turn it off. In addition, turning AppleTalk off puts File Sharing to sleep without turning it off so that when you turn AppleTalk back on, File Sharing starts right up (relatively speaking). Handy, I think. File Sharing is also a power hog because it uses the disk, keeping you from running with the disk spun down. Virtual Memory is the same way, which is why it complains when it is started up on the PowerBook.
If you never connect your Powerbook to a network, then donÕt worry about this FKEY. You are too isolated to need it. Turn Appletalk off and go back to bed.
So, I wanted an FKEY that allowed me to blast AppleTalk off with a single key combo and hit the road. This is the ToggleAT FKEY. It comes as resource ID 12, which is only useful if you use a macro program like QuicKeys to trigger it. If you want to use it without such, you will need to renumber it. You also have to figure out how to install it. IÕm not your mother. I will give you a clue though; use ResEdit.
The current implementation simply turns AppleTalk on and off by opening and closing the .MPP driver, which is the lowest level of AppleTalk. It also changes the global variable SPConfig, so the Chooser will see the setting, and then it writes this out to PRAM so that it will be remembered.
WARNING: If you crash or reboot with AppleTalk turned off you will need to reboot again to turn it back on. BFD, I know. You have been warned though. Note that this can be good since booting without Appletalk takes less memory.
ANOTHER WARNING: This only works with LocalTalk or Phonenet connected to the Printer port. I havenÕt seen any PowerBooks with Ethernet, but this is almost certainly guarenteed to fail in such a configuration.
YET ANOTHER WARNING: This will work on other machines besides the PowerBook, but I wouldnÕt recommend it and I donÕt see any reason to bother. However, I just know there is some goober out there thinking about doing it. If that is you, please, DONÕT call me.
FINAL DIRE WARNING: This is an egregious hack. If it fails, throw it away and never use it again. DonÕt expect me to fix it. Of course, if you have a clue why it failed I wouldnÕt mind knowing about it, but donÕt expect me to fix it. There are also a couple of Macsbug calls to report obscure and unlikely error conditions. They will crash your machine if you are not running Macsbug.
Special NaySayers Award to Tim Dierks and Steve Falkenberg for saying it couldnÕt and shouldnÕt be done. ItÕs simple, clean and documented. Up yours. :Â)
Things to do: This needs a companion INIT that will turn AppleTalk back on whenever you restart or shutdown the machine. This way it will always be loaded. This doesnÕt really affect this FKEY, but itÕs a related item.
Feel free to send questions, comments, insults and money.